/***
    Amrita ITEWS - Copyright (C) 2009 Amrita Vishwa Vidyapeetham, Amritapuri.
                                       (http://www.amrita.edu)
    ***************************************************************************
    This file is part of the Amrita ITEWS distribution.
    Amrita ITEWS is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License (version 2) as published
    by the Free Software Foundation AND MODIFIED BY the Amrita ITEWS exception.
    ***NOTE*** The exception to the GPL is included to allow you to distribute
    a combined work that includes Amrita ITEWS without being obliged to provide
    the source code for proprietary components outside of the Amrita ITEWS
    software. Amrita ITEWS is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
    Public License for more details. You should have received a copy of the GNU
    General Public License and the Amrita ITEWS license exception along with
    Amrita ITEWS if not then it can be viewed here:
    http://itews.amrita.ac.in/license.html.


    Documentation, latest information, license and contact details are at:
    http://itews.amrita.ac.in/


    Amrita ITEWS source code can be found at:
    http://code.google.com/p/itews


    The initial code-base of Amrita ITEWS was developed by Amrita Vishwa
    Vidyapeetham as part of the project titled,"Intelligent & Interactive
    Telematics using Emerging Wireless Technologies for Transport Systems
    (ITEWS)" sponsored by Technology Information Forecasting and Assessment
    Council (TIFAC), India.
***/

/*! \file config_api.h
    \brief Config API Header file.
*/

#ifndef CONFIG_API_H_
#define CONFIG_API_H_

#include <config_types.h>
#include <string_tbl_api.h>
#include <eventq_errno.h>
#include <errno.h>
#include <str_printf.h>

#ifdef CONFIG_SPACE_TDU
#include <config_space_tdu.h>
#endif

#ifdef CONFIG_SPACE_GPRSCLGW
#include <config_space_gprsclgw.h>
#endif

/*#ifdef CONFIG_SPACE_MISC
#include <config_space_misc.h>
#endif*/

#ifdef CONFIG_SPACE_IGPSU
#include <config_space_igpsu.h>
#endif

#ifdef CONFIG_SPACE_VOC
#include <config_space_voc.h>
#endif

#ifdef CONFIG_SPACE_SPODAPP
#include <config_space_spodapp.h>
#endif

/*! \brief Parameter Descriptor Table Maximum Size.*/
#define CONFIG_MAX_PARAM_TBLSZ          50

/*! \brief Config Name Descriptor Table Maximum Size.*/
#define CONFIG_MAX_NAME_DPTR_TBLSZ      20

/*! \brief Read Only Mode. */
#define CONFIG_READ_ONLY                0x00

/*! \brief Write Only Mode. */
#define CONFIG_WRITE_ONLY               0x01

/*! \brief Read-Write Mode. */
#define CONFIG_READ_WRITE               0x00

/* APIs */

STATUS config_open      ( HCONFIG *h, const char *config_space_name, uint16 mode );
STATUS config_close     ( HCONFIG h );
STATUS config_get_int   ( HCONFIG h, uint32 param, int32 *val );
STATUS config_set_int   ( HCONFIG h, uint32 param, int32 val );
STATUS config_get_str   ( HCONFIG h, uint32 param, char *valbuf, int nvalbuf);
STATUS config_set_str   ( HCONFIG h, uint32 param, const char *val );


#endif /*CONFIG_API_H_*/
